package com.jiandian.dao;

import com.jiandian.entity.Dict;
import com.jiandian.page.PageInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 字典 Mapper
 *
 * @author Houqi Fu
 * @date 2019/01/31
 */
@Mapper
@Component
public interface DictMapper {
    Dict selectByPrimaryKey(Integer id);

    List<Dict> selectAll(PageInfo pageInfo);

    int selectCount(PageInfo pageInfo);

    List<Dict> batchQueryByIds(List<Integer> ids);

    int updateByPrimaryKey(Dict record);

    int insert(Dict record);

    int batchInsert(List<Dict> list);

    int batchDeleteById(List<Integer> ids);

    int deleteByPrimaryKey(Integer id);

    Dict findByKey(@Param("key") String key);

    int updateByKey(Dict dict);
}
